class SingLetonLazy{
    private static SingLetonLazy instance=null;
    public static SingLetonLazy getInstance() {
        if(instance==null){
        synchronized (Demo2.class) {
            if (instance == null) {
                instance = new SingLetonLazy();
            }
        }

        }
        return instance;
    }
}





public class Demo2 {
    public static void main(String[] args) {
    SingLetonLazy s1=SingLetonLazy.getInstance();
    SingLetonLazy s2=SingLetonLazy.getInstance();
        System.out.println("s1==s2");
    }
}
